// Copyright © SixtyFPS GmbH <info@slint.dev>
// SPDX-License-Identifier: GPL-3.0-only OR LicenseRef-Slint-Royalty-free-1.2 OR LicenseRef-Slint-commercial

Comp := Rectangle {
    Rectangle {
        width: 5%;
        height: 5%;
        background: white;
        opacity: 1;
    }
}


TestCase := Window {
    width: 800px;
    height: 600px;
    background: green;

    Rectangle {
        background: red;
        width: 50%;
        height: 50%;
        opacity: 0.5;
    }

    Comp {
        background: blue;
        x: parent.width / 4;
        y: parent.height / 4;
        width: 50%;
        height: 50%;
        opacity: 0.5;
        Rectangle {
            width: 10%;
            height: 10%;
            background: yellow;
        }
    }

    for i in 3 : Rectangle {
        background: black;
        width: 10%;
        height: 10%;
        opacity: 0.2 * (i + 1);
        y: parent.height / 3;
        x: parent.width / 4 * i;
    }


}
